<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <title>软件园商城</title>
  <link href="css/bootstrap.min.css" rel="stylesheet">
  <link href="css/signin.css" rel="stylesheet">
</head>

<body class="text-center">
<form class="form-signin" action="/dologin" method="POST">
  <img class="mb-4" src="img/bootstrap-solid.svg" alt="" width="72" height="72">
  <h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
  <label class="sr-only">用户名</label>
  <input type="text" name="name" class="form-control" placeholder="Username" required="" autofocus="">
  <label class="sr-only">密码</label>
  <input type="password" name="password" class="form-control" placeholder="Password" required="">

  <!-- 错误信息提示 -->
  <div th:if="${msg != null}" class="alert alert-danger" role="alert">
    <span th:text="${msg}"></span>
  </div>

  <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button><br>
  <a href="#" th:href="@{/toRegister}">没有账号?立即注册</a>
  <p class="mt-5 mb-3 text-muted">© 2025-2035</p>
  <span style="color:red;" th:text="${msg==''?'':msg}"></span><br>
</form>

</body>

</html>
